project( shareLibTest2 )

#用于生成位置无关的代码,使代码在加载到内存时使用相对地址，所有对固定地址的访问都通过全局偏移表(GOT)来实现
add_compile_options(-fPIC)

#aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} src)
set( src
    ${CMAKE_CURRENT_SOURCE_DIR}/shareLibTest2.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/shareLibTest2.h
)

set (headfile )

include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}
)

set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../build)
#STATIC是生成静态库，SHARED是生成动态库
#add_library ( ${PROJECT_NAME} STATIC ${src})
add_library ( ${PROJECT_NAME} SHARED ${src})

add_definitions(-D shareLibTest2_Export) #宏定义添加

